

//
//  UIView+Extension.h
//  DiabetesAppCxb
//
//  Created by pacific on 15/3/26.
//  Copyright (c) 2015年 caoxiaobo. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Extension)
@property (nonatomic, assign) CGFloat cX;
@property (nonatomic, assign) CGFloat cY;
@property (nonatomic, assign) CGFloat cCenterX;
@property (nonatomic, assign) CGFloat cCenterY;
@property (nonatomic, assign) CGFloat cWidth;
@property (nonatomic, assign) CGFloat cHeight;
@property (nonatomic, assign) CGSize cSize;



#pragma mark- view的切换动画
/**
 These methods animate background color of a view using shape animation.
 */
- (void)mdInflateAnimatedFromPoint:(CGPoint)point backgroundColor:(UIColor *)backgroundColor duration:(NSTimeInterval)duration completion:(void (^)(void))block;
- (void)mdDeflateAnimatedToPoint:(CGPoint)point backgroundColor:(UIColor *)backgroundColor duration:(NSTimeInterval)duration completion:(void (^)(void))block;

/**
 - transtion uses duration * 0.65 for shape transition and (duration - duration * 0.65) for fade animation, change it if you want
 */
+ (void)mdInflateTransitionFromView:(UIView *)fromView
                             toView:(UIView *)toView
                      originalPoint:(CGPoint)originalPoint
                           duration:(NSTimeInterval)duration
                         completion:(void (^)(void))block;

+ (void)mdDeflateTransitionFromView:(UIView *)fromView
                             toView:(UIView *)toView
                      originalPoint:(CGPoint)originalPoint
                           duration:(NSTimeInterval)duration
                         completion:(void (^)(void))block;



@end
